<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.ajax4jsf.org/rich" xml:lang="en">
<head>
<title>添加通知</title>
<meta http-equiv="keywords" content="enter,your,keywords,here" />
<meta http-equiv="description"
	content="A short description of this page." />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/public.css"
	rel="stylesheet" type="text/css" media="screen" />
<link
	href="#{facesContext.externalContext.requestContextPath}/css/main.css"
	rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<!-- rich:message style-->
<style type="text/css">
	.rich-message-label{
		color:red;
	}
</style>
</head>
<body style="background-color: #ffffff">
<script type="text/javascript">		
	function submit(obj) {
		var selectedbValue = obj.value;
		if (selectedbValue == "1") {
			document.getElementById("subArea").style.display = '';
		} else if (selectedbValue == "2") {
			document.getElementById("subArea").style.display = 'none';
		} else{
			document.getElementById("subArea").style.display = 'none';
		}	
	}
</script>
<h:form>
	<div id="right">
	<div id="msgid" class="error pt10p bcf c0 tal" style="display: ">
	<a4j:outputPanel id="msgPanel">
		<center><h:outputText styleClass="cff"
			value="#{NoticeBB.msg}" /></center>
	</a4j:outputPanel></div>
	<div class="tablelist">
	<table width="100%" border="1" cellpadding="0" cellspacing="0"
		bordercolor="#c3c3c3" style="border-collapse: collapse">
		<tr>
			<td><span class="cff">*</span>OFFICE<h:selectOneMenu id="tp_office_code"
				class="style_input" value="#{NoticeBB.notice.officeCode}" required="true">
				<f:selectItems value="#{otherParamBB.selectItems_officeInfId}" />
			</h:selectOneMenu></td>
			<td><span class="cff">*</span>通知类型 <h:selectOneMenu id="tp_notice_kind"
				class="style_input" value="#{NoticeBB.notice.tpNoticekind}" required="true">
				<f:selectItems value="#{paramBB.selectItem['tp_noticekind']}" />
			</h:selectOneMenu></td>
			<td>
			<span class="cff">*</span>通知级别 <h:selectOneMenu id="tp_notice_level"
				class="style_input" value="#{NoticeBB.notice.tpNoticelevel}" required="true">
				<f:selectItems value="#{paramBB.selectItem['tp_noticelevel']}" />
			</h:selectOneMenu>
			</td>
		</tr>
		<tr>
			<td class="yellow"><span class="cff">*</span>生成标识 <h:selectOneMenu id="tp_notice_flag"
				class="style_input"
				value="#{NoticeBB.notice.tpBuildflag}">
				<f:selectItems value="#{paramBB.selectItem['tp_buildflag']}" />
			</h:selectOneMenu></td>
			<td class="yellow"><span class="cff">*</span>开始日期
				<rich:calendar id="tp_used_begin" styleClass="a1input1" value="#{NoticeBB.notice.tpUsedBegin}" datePattern="yyyy-MM-dd" required="true"/></td>
			<td class="yellow"><span class="cff">*</span>结束日期
				<rich:calendar id="tp_used_end" styleClass="a1input1" value="#{NoticeBB.notice.tpUsedEnd}" datePattern="yyyy-MM-dd" required="true"/></td>
		</tr>
		<tr>
			<td><rich:message for="tp_notice_flag" showSummary="true" showDetail="false" /></td>
			<td><rich:message for="tp_used_begin" showSummary="true" showDetail="false" /></td>
			<td><rich:message for="tp_used_end" showSummary="true" showDetail="false" /></td>
		</tr>
		<tr>
			<td><span class="cff">*</span>主题 <h:inputText id="tp_title"
				class="style_input" value="#{NoticeBB.notice.tpTitle}" required="true"/></td>
			<td></td>
			<td></td>
		</tr>
		<tr>
			<td><span class="notice"><rich:message for="tp_title" showSummary="true" showDetail="false" /></span></td>
			<td></td>
			<td></td>
		</tr>
		<tr>
		    <td colspan="3"><span class="cff">*</span>通知内容
				<h:inputTextarea id="tp_cont" class="style_textarea" 
			    value="#{NoticeBB.notice.tpCont}" required="true"></h:inputTextarea></td>
		</tr>
		<tr>
			<td colspan="3"><span class="notice"><rich:message for="tp_cont" showSummary="true" showDetail="false" /></span></td>
		</tr>
	</table>
	<div class="listbut"><h:commandButton styleClass="buttonbg" value="保存" action="#{NoticeBB.addNotice_0}" reRender="msgPanel" /> 
		<h:commandButton styleClass="buttonbg" value="返回" action="#{TrainBB.toBack}" immediate="true"/>
    </div>
	</div>
	</div>
</h:form>

</body>
</html>

